Optimal. Leaf size=33 \[ \frac {a^2 \tan (c+d x)}{d}+\frac {2 a b \tanh ^{-1}(\sin (c+d x))}{d}+b^2 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 33, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {2789, 3770, 3012, 8} \[ \frac {a^2 \tan (c+d x)}{d}+\frac {2 a b \tanh ^{-1}(\sin (c+d x))}{d}+b^2 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2789
Rule 3012
Rule 3770
Rubi steps
\begin {align*} \int (a+b \cos (c+d x))^2 \sec ^2(c+d x) \, dx &=(2 a b) \int \sec (c+d x) \, dx+\int \left (a^2+b^2 \cos ^2(c+d x)\right ) \sec ^2(c+d x) \, dx\\ &=\frac {2 a b \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a^2 \tan (c+d x)}{d}+b^2 \int 1 \, dx\\ &=b^2 x+\frac {2 a b \tanh ^{-1}(\sin (c+d x))}{d}+\frac {a^2 \tan (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.08, size = 32, normalized size = 0.97 \[ \frac {a^2 \tan (c+d x)+2 a b \tanh ^{-1}(\sin (c+d x))+b^2 d x}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.91, size = 74, normalized size = 2.24 \[ \frac {b^{2} d x \cos \left (d x + c\right ) + a b \cos \left (d x + c\right ) \log \left (\sin \left (d x + c\right ) + 1\right ) - a b \cos \left (d x + c\right ) \log \left (-\sin \left (d x + c\right ) + 1\right ) + a^{2} \sin \left (d x + c\right )}{d \cos \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.65, size = 77, normalized size = 2.33 \[ \frac {{\left (d x + c\right )} b^{2} + 2 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - 2 \, a b \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) - \frac {2 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.08, size = 49, normalized size = 1.48 \[ b^{2} x +\frac {a^{2} \tan \left (d x +c \right )}{d}+\frac {2 a b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}+\frac {c \,b^{2}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.42, size = 48, normalized size = 1.45 \[ \frac {{\left (d x + c\right )} b^{2} + a b {\left (\log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + a^{2} \tan \left (d x + c\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.57, size = 181, normalized size = 5.48 \[ \frac {2\,b^2\,\mathrm {atan}\left (\frac {64\,b^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{256\,a^2\,b^4+64\,b^6}+\frac {256\,a^2\,b^4\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{256\,a^2\,b^4+64\,b^6}\right )}{d}-\frac {2\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}+\frac {4\,a\,b\,\mathrm {atanh}\left (\frac {128\,a\,b^5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{512\,a^3\,b^3+128\,a\,b^5}+\frac {512\,a^3\,b^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{512\,a^3\,b^3+128\,a\,b^5}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \cos {\left (c + d x \right )}\right )^{2} \sec ^{2}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________